<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<?php
session_start();
if(!isset($_SESSION['user']))
{
	header('location:login.php');
}
include('config.php');
extract($_POST);
if($otp=="123456")
{
    $bookid="BKID".rand(1000000,9999999);
    mysqli_query($con,"insert into tbl_bookings values(NULL,'$bookid','".$_SESSION['theatre']."','".$_SESSION['user']."','".$_SESSION['show']."','".$_SESSION['screen']."','".$_SESSION['seats']."','".$_SESSION['amount']."','".$_SESSION['date']."',NOW(),'1')");
    $_SESSION['success']="购票成功";
}
else
{
    $_SESSION['error']="付款失败";
}
?>
<body><table align='center'><tr><td><STRONG>正在付款当中,</STRONG></td></tr><tr><td><font color='blue'>请耐心等待....<i class="fa fa-spinner fa-pulse fa-fw"></i>
<span class="sr-only"></font></td></tr><tr><td>(请不要刷新页面或关闭页面避免付款失败！！！ )</td></tr></table><h2>
<script>
    setTimeout(function(){
        window.location="profile.php"; }, 5000);
</script>